Class symantec.itools.awt.ImageListBox
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.ImageListBox

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.ImageListBox

public class ImageListBox
extends Panel
implements ItemSelectable
A box containing a list of images and/or text.

Use an ImageListBox to display a set of images and/or text that the user can select. The user cannot enter text in an ImageListBox.

Version:
1.1, June 7, 1997
Author:
Symantec

Variable Index

 o BORDER_NONE
Defines the "no border" style.
 o BORDER_REGULAR
Defines the "regular" (lowered) border style.
 o EVT_IMAGE_SELECT
The ID of the event posted when the image portion of a list item is selected.
 o HBar
The horizontal scroll bar.
 o IMAGE_WIDTH
Defines the width of all images displayed in the list, in pixels.
 o LINE_SLOP
Extra space at end of a line.
 o VBar
The vertical scroll bar.
 o bAllDirty
If true the list is dirty (needs repaint).
 o bAllowShowHBar
If true the horizontal scrollbar will be made visible when necessary, false if it will never be made visible.
 o bAllowShowVBar
If true the vertical scrollbar will be made visible when necessary, false if it will never be made visible.
 o bBlockPaint
If true the repainting of the control is prevented.
 o bCellBorders
If true list items have borders by default.
 o bComboMode
If true this ImageListBox is in "ComboBox mode".
 o bHBarVisible
True if the horizontal scroll bar is currently visible.
 o bInternalBlockPaint
True if repainting is temporarily disabled for efficiency purposes.
 o bMouseDrawHandled
True if drawing was handled on mouse down and no drawing action needs to be taken on mouse up.
 o bMultipleSelections
It true multiple list items can be selected at the same time.
 o bVBarVisible
True if the vertical scroll bar is currently visible.
 o barSize
The width of scroll bars, in pixels.
 o borderDarkColor
Color used in drawing of the border.
 o borderDarkerColor
Color used in drawing of the border.
 o borderLightColor
Color used in drawing of the border.
 o borderLighterColor
Color used in drawing of the border.
 o borderType
The current border type of this ImageListBox, one of BORDER_REGULAR or BORDER_NONE.
 o borderWidth
Width of the left and right borders combined, in pixels.
 o cachedBackground
Cached value of the background color.
 o cellHt
Height of a single list cell, in pixels.
 o colsToShow
The number of columns to show when this component is automatically laid out.
 o countSelected
The number of list items currently selected.
 o disabledColor
The default color for disabled text items.
 o enabledColor
The default color for enabled text items.
 o errors
Error strings.
 o fastDownCount
Used to detect two mouse pressed events without a mouse released event in-between.
 o fm
The font metrics of the font used for drawing text.
 o font
The font used for drawing text.
 o fontDescent
The typical distance from the base line to the bottom of most characters in the current font.
 o fontHeight
The standard height of a line of text in the current font.
 o halfBorderWidth
Width of the left or right border, in pixels.
 o ilbLabel
The label of this listbox (not displayed).
 o items
A vector of the items in the list.
 o lWidth
Width of the list content portion of this component, in pixels.
 o lastDownModifiers
Not used.
 o lastIndex
The zero-relative index of the item the mouse was last moved over, dragged over, or clicked on.
 o lastSelected
The zero-relative index of the currently selected item in the list.
 o lastTempIndex
The zero-relative index of the item the mouse was pressed on.
 o longestLineValue
The width of the widest list item, in pixels.
 o nTopRow
Zero-relative index of the item displayed in the top row.
 o prevSelectRow
The zero-relative index of the row at which the mouse was previously released.
 o prevSelectTime
The time at which the mouse was released, in milliseconds.
 o rowsToShow
The number of rows to show when this component is automatically laid out.
 o textHighlight
The background color for highlighted text.
 o textHighlightText
The text color for highlighted text.
 o visibleCols
The number of currently visible columns in this list.
 o visibleIndex
The zero-relative index of the first visible list item.
 o visibleRows
The number of currently visible lines in this list.
 o xCoord
The amount the list items are scrolled horizontally, in pixels.
 o yAdj
Top margin before the contents of the first list item, in pixels.

Constructor Index

 o symantec.itools.awt.ImageListBox()
Constructs a default ImageListBox.
 o symantec.itools.awt.ImageListBox(String)
Constructs an ImageListBox with the specified label.
 o symantec.itools.awt.ImageListBox(String, boolean)
Constructs an ImageListBox with the specified label and conditionally allows multiple selections.
 o symantec.itools.awt.ImageListBox(String, int, boolean)
Constructs an ImageListBox with the specified label, the specified number of visible rows, and conditionally allows multiple list item selection.
 o symantec.itools.awt.ImageListBox(Component, String, int, boolean)
 o symantec.itools.awt.ImageListBox(Component, String)

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this component.
 o addItem(String)
Adds an item to the end of the list and enables the item.
 o addItem(String, boolean)
Adds an item to the end of the list and conditionally enables it.
 o addItem(Image, String)
Adds an item with an image to the end of the list and enables it.
 o addItem(Image, String, boolean)
Adds an item with an image to the end of the list and conditionally enables it.
 o addItem(Image, String, boolean, Color)
Adds an item with an image to the end of the list and conditionally enables it.
 o addItem(ListItem)
Adds an ListItem to the end of the list.
 o addItemListener(ItemListener)
Adds the specified item listener to receive item events
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o allSelected()
 o allowsMultipleSelections()
 o blockPaint(boolean)
Blocks the repainting of the control.
 o calculateBorderColors(Color)
Used to calculate the border colors from the background color.
 o changeImage(int, Image)
 o changeText(int, String)
 o clear()
Clears the list.
 o countItems()
Returns the total number of items in the list.
 o ctrlSelect(int)
Selects an index in a ImageListBox using the Ctrl modifier to mimic mouse selecting with the Ctrl modifier.
 o delItem(int)
Delete an item from the list.
 o delItems(int, int)
Delete multiple items from the list.
 o delSelectedItems()
Deletes the currently selected items from the list.
 o deselect(int)
 o deselectAll()
Deselects all items in the list.
 o disable(int)
 o enable(int, boolean)
 o enable(int)
 o extraPaint(Graphics, Rectangle)
Override this method to add any special painting effects after text and images are painted
 o getBorderType()
Gets the current border type of the ImageListBox.
 o getBorderWidth()
Get the width of the border around the component.
 o getCellBorders()
 o getCellHeight()
Get the height of an individual row.
 o getColumns()
Returns the number of columns to be used by minimumSize().
 o getComboMode()
 o getEdited(int)
 o getEnabledTextColor(int)
Gets the text color for an item at the given index.
 o getImage(int)
Gets the image associated with the specified zero-relative index.
 o getImageURL(int)
Gets the URL of the image displayed at the given zero-based index.
 o getItem(int)
 o getLabel()
Returns the current list box label.
 o getListItems()
Returns the current list as an array.
 o getMinimumSize(int)
Returns the minimum dimensions needed to show the given number of rows in the list.
 o getMinimumSize()
Returns the minimum dimensions to properly display this component.
 o getPreferredSize(int)
Returns the preferred dimensions needed for the list with the specified number of rows.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o getRows()
Returns the number of currently visible lines in this list.
 o getRowsToShow()
Gets the current number of rows to display.
 o getSelectedIndex()
Gets the zero-relative index of the selected item in the list.
 o getSelectedIndexes()
Returns the indexes of all the selected items in the list.
 o getSelectedItem()
Returns the currently selected item in the list.
 o getSelectedItems()
Returns all of the the selected items in the list.
 o getSelectedObjects()
Returns the selected items in the list.
 o getShowHorizontalScroll()
 o getShowVerticalScroll()
 o getText(int)
Gets the item text associated with the specified zero-relative index.
 o getTopRow()
Returns the index of the item visible at the top of the window.
 o getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.
 o insertItem(int, Image, String, boolean)
Inserts an item with an image at a specific zero-relative index and conditionally enables it.
 o insertItems(int, Vector, Image, boolean)
Inserts a vector list of items at a specific zero-relative index and conditionally enables them.
 o isAllSelected()
Query if all rows are selected.
 o isCellBorders()
Gets the current default cell border display mode.
 o isComboMode()
Gets the current "ComboBox mode" setting.
 o isDirty()
Query the lists all "dirty" state
 o isEdited(int)
Gets the "edited" flag state for the item at the given zero-relative index.
 o isEnabled(int)
Gets the enabled state of a specific item in the list.
 o isFocusTraversable()
 o isMultipleSelections()
Returns true if this list allows multiple selections.
 o isSelected(int)
Get the selected state of the item at the given index.
 o isShowHorizontalScroll()
Gets the current horizontal scrollbar visibility flag.
 o isShowVerticalScroll()
Gets the current vertical scrollbar visibility flag.
 o isVisibleIndex(int)
Determines if the item at the given index is visible.
 o keyCalcIndex(int, boolean)
Determines the current index given a new absolute or relative index.
 o makeVisible(int)
 o minimumSize(int)
 o minimumSize()
 o mouseCalcIndex(int)
A utility routine that determines the index of the item the mouse is in, given the vertical coordinate of the mouse.
 o notifyHelper(int, int, int, boolean)
Utility routine to generate action and/or item events in response to key or mouse events.
 o paint(Graphics)
Paints this component using the given graphics context.
 o paramString()
Returns a string representing the state of this object.
 o preferredSize(int)
 o preferredSize()
 o removeActionListener(ActionListener)
Removes the specified action listener so it no longer receives action events from this component.
 o removeItemListener(ItemListener)
Removes the specified item listener so it no longer receives item events.
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o scrollHorizontal(int, boolean)
Scrolls the ImageListBox horizontally
 o scrollVertical(int, boolean)
Scrolls the ImageListBox vertically.
 o select(int)
 o select(String)
 o selectAll()
Selects all the items in the list.
 o selectMultiple(int, boolean, boolean)
Selects an item at the specified index in a multiple-selection-enabled ImageListBox using Shift, Ctrl or Ctrl-Shift modifiers to mimic mouse selecting with the Shift, Ctrl or Ctrl-Shift modifiers.
 o setBorderType(int)
Sets the border type of the ImageListBox.
 o setCellBorder(int, boolean)
Conditionally show a border around the cell at the specified index.
 o setCellBorders(boolean)
Sets the ImageListBox cell border display default, and resets all items to have the border conditionally.
 o setColumns(int)
Sets the number of columns to be used by getMinimumSize().
 o setComboMode(boolean)
Sets ImageListBox "ComboBox mode".
 o setDirty(boolean)
Set the list to be "dirty" (true) to force a complete paint on next repaint, or "clean" (false) to avoid a complete paint on the next repaint.
 o setDirty()
 o setEdited(int, boolean)
Set a flag indicating that the item at the given zero-relative index has been edited.
 o setEnabled(int, boolean)
Conditionally enables the specified item in the list.
 o setEnabledTextColor(int, Color)
Sets the text color for an item at the given index.
 o setFont(Font)
Set the font for the items in the list box.
 o setImage(int, Image)
Change the image associated with an item at a specific zero-relative index.
 o setImageURL(int, URL)
Sets the URL of the image to display at the given zero based index
 o setLabel(String)
Sets the current list box label.
 o setListItems(String[])
Initializes the list with the string array.
 o setMultiColumnMode(boolean)
Sets the mode of the ImageListBox to "MultiColumnListBox mode".
 o setMultipleSelections(boolean)
Sets whether this list should allow multiple selections or not.
 o setRowsToShow(int)
Sets the number of rows to display in the ImageListBox.
 o setSelectedIndex(int, boolean)
Select the item at the specified index.
 o setSelectedItem(String, boolean)
Sets the slelection state of the first item in the list which has exactly matching text.
 o setShowHorizontalScroll(boolean)
Sets the horizontal scrollbar visibility flag.
 o setShowVerticalScroll(boolean)
Sets the vertical scrollbar visibility flag.
 o setText(int, String)
Changes the text associated with the item at the specified zero-relative index.
 o setTopRow(int)
Forces the item at the specified index to be visible at the top of the window.
 o setVisibleIndex(int)
Forces the item at the specified index to be visible in the window.
 o shiftSelect(int, boolean)
Selects an index in a multiple-selection-enabled ImageListBox using Shift or Ctrl-Shift modifiers to mimic mouse selecting with the Shift or Ctrl-Shift modifiers.
 o show()
Makes this component visible.
 o sourceActionEvent(String)
Fire an action event to the listeners
 o sourceItemEvent()
Fire an item event to the listeners
 o update(Graphics)
Handles redrawing of this component on the screen.
 o validIndex(int)
Determines if the given index is valid.

Variables

 o BORDER_NONE
public static final int BORDER_NONE
Defines the "no border" style. This indicates the list box will have no border drawn around it.

See Also:
setBorderType, getBorderType
 o BORDER_REGULAR
public static final int BORDER_REGULAR
Defines the "regular" (lowered) border style. This makes the list box appear lower than the surrounding area.

See Also:
setBorderType, getBorderType
 o EVT_IMAGE_SELECT
public static final int EVT_IMAGE_SELECT
The ID of the event posted when the image portion of a list item is selected.

 o HBar
protected java.awt.Scrollbar HBar
The horizontal scroll bar. It always exists event if not shown or showable.

 o IMAGE_WIDTH
public static final int IMAGE_WIDTH
Defines the width of all images displayed in the list, in pixels.

 o LINE_SLOP
protected final int LINE_SLOP
Extra space at end of a line.

 o VBar
protected java.awt.Scrollbar VBar
The vertical scroll bar. It always exists event if not shown or showable.

 o bAllDirty
protected transient boolean bAllDirty
If true the list is dirty (needs repaint).

 o bAllowShowHBar
protected boolean bAllowShowHBar
If true the horizontal scrollbar will be made visible when necessary, false if it will never be made visible.

See Also:
setShowHorizontalScroll
 o bAllowShowVBar
protected boolean bAllowShowVBar
If true the vertical scrollbar will be made visible when necessary, false if it will never be made visible.

See Also:
setShowVerticalScroll
 o bBlockPaint
protected boolean bBlockPaint
If true the repainting of the control is prevented.

 o bCellBorders
protected boolean bCellBorders
If true list items have borders by default. Borders are always shown as a solid single-pixel wide line around the cell.

See Also:
setCellBorders
 o bComboMode
protected boolean bComboMode
If true this ImageListBox is in "ComboBox mode". "ComboBox mode" allows the selection point to follow the mouse even when the mouse button is not down. This only applies when the ImageListBox is not allowing multiple selections.

See Also:
setComboMode
 o bHBarVisible
protected boolean bHBarVisible
True if the horizontal scroll bar is currently visible.

 o bInternalBlockPaint
protected transient boolean bInternalBlockPaint
True if repainting is temporarily disabled for efficiency purposes.

 o bMouseDrawHandled
protected boolean bMouseDrawHandled
True if drawing was handled on mouse down and no drawing action needs to be taken on mouse up.

 o bMultipleSelections
protected boolean bMultipleSelections
It true multiple list items can be selected at the same time.

 o bVBarVisible
protected boolean bVBarVisible
True if the vertical scroll bar is currently visible.

 o barSize
protected transient int barSize
The width of scroll bars, in pixels. Calculated in addNotify.

 o borderDarkColor
protected java.awt.Color borderDarkColor
Color used in drawing of the border.

 o borderDarkerColor
protected java.awt.Color borderDarkerColor
Color used in drawing of the border.

 o borderLightColor
protected java.awt.Color borderLightColor
Color used in drawing of the border.

 o borderLighterColor
protected java.awt.Color borderLighterColor
Color used in drawing of the border.

 o borderType
protected int borderType
The current border type of this ImageListBox, one of BORDER_REGULAR or BORDER_NONE. A regular border makes the list box appear lower than the surrounding area.

See Also:
getBorderType, BORDER_REGULAR, BORDER_NONE
 o borderWidth
protected int borderWidth
Width of the left and right borders combined, in pixels.

 o cachedBackground
protected java.awt.Color cachedBackground
Cached value of the background color. Used to determine if calculated colors need to be updated.

 o cellHt
protected int cellHt
Height of a single list cell, in pixels.

 o colsToShow
protected int colsToShow
The number of columns to show when this component is automatically laid out.

 o countSelected
protected transient int countSelected
The number of list items currently selected.

 o disabledColor
protected java.awt.Color disabledColor
The default color for disabled text items.

 o enabledColor
protected java.awt.Color enabledColor
The default color for enabled text items.

 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o fastDownCount
protected int fastDownCount
Used to detect two mouse pressed events without a mouse released event in-between. This may sometimes happen if the mouse is pressed twice very quickly.

 o fm
protected transient java.awt.FontMetrics fm
The font metrics of the font used for drawing text.

 o font
protected java.awt.Font font
The font used for drawing text.

 o fontDescent
protected transient int fontDescent
The typical distance from the base line to the bottom of most characters in the current font.

 o fontHeight
protected transient int fontHeight
The standard height of a line of text in the current font.

 o halfBorderWidth
protected int halfBorderWidth
Width of the left or right border, in pixels.

 o ilbLabel
protected java.lang.String ilbLabel
The label of this listbox (not displayed).

 o items
protected java.util.Vector items
A vector of the items in the list.

 o lWidth
protected int lWidth
Width of the list content portion of this component, in pixels. This excludes the border and vertical scroll bar, if present.

 o lastDownModifiers
protected transient int lastDownModifiers
Not used.

 o lastIndex
protected transient int lastIndex
The zero-relative index of the item the mouse was last moved over, dragged over, or clicked on. This field is only valid while the mouse is over this component. When the mouse is not over this component the value is -1.

 o lastSelected
protected transient int lastSelected
The zero-relative index of the currently selected item in the list. If multiple items are selected, this is the index of the item most recently selected. If no items are selected, the value is -1.

 o lastTempIndex
protected transient int lastTempIndex
The zero-relative index of the item the mouse was pressed on. It is used when bMultipleSelections is false, and valid between the time the mouse is pressed and released. All other times it equals -1.

 o longestLineValue
protected int longestLineValue
The width of the widest list item, in pixels.

 o nTopRow
protected int nTopRow
Zero-relative index of the item displayed in the top row.

 o prevSelectRow
protected transient long prevSelectRow
The zero-relative index of the row at which the mouse was previously released. This is used to determine when a double-click occurs.

 o prevSelectTime
protected transient long prevSelectTime
The time at which the mouse was released, in milliseconds. This is used to determine when a double-click occurs.

 o rowsToShow
protected int rowsToShow
The number of rows to show when this component is automatically laid out. If rows is less than or equal to zero, it will size to show all of the existing list items when automatically laid out.

 o textHighlight
protected java.awt.Color textHighlight
The background color for highlighted text.

 o textHighlightText
protected java.awt.Color textHighlightText
The text color for highlighted text.

 o visibleCols
protected transient int visibleCols
The number of currently visible columns in this list.

 o visibleIndex
protected int visibleIndex
The zero-relative index of the first visible list item.

 o visibleRows
protected transient int visibleRows
The number of currently visible lines in this list.

 o xCoord
protected int xCoord
The amount the list items are scrolled horizontally, in pixels.

 o yAdj
protected int yAdj
Top margin before the contents of the first list item, in pixels.

Constructors

 o ImageListBox
public ImageListBox()
Constructs a default ImageListBox. A default ImageListBox has no label, will size to show all of the existing list items when automatically laid out, and allows single list item selection.

 o ImageListBox
public ImageListBox(String label)
Constructs an ImageListBox with the specified label. It will size to show all of the existing list items when automatically laid out, and allows single list item selection. Note: he label of an ImageListBox does not get displayed.

Parameters:
label - the label of the list box (not displayed)
 o ImageListBox
public ImageListBox(String label,
                    boolean bMultipleSelections)
Constructs an ImageListBox with the specified label and conditionally allows multiple selections. It will size to show all of the existing list items when automatically laid out. Note: the label of an ImageListBox does not get displayed.

Parameters:
label - the name label of the list box (not displayed)
bMultipleSelections - if true then multiple selections are allowed; if false only single item selections are allowed
 o ImageListBox
public ImageListBox(String slabel,
                    int rows,
                    boolean bMultipleSelections)
Constructs an ImageListBox with the specified label, the specified number of visible rows, and conditionally allows multiple list item selection.

Parameters:
slabel - the label of the list box (not displayed)
rows - the number of row items to show. If rows is less than or equal to zero, it will size to show all of the existing list items when automatically laid out.
bMultipleSelections - if true then multiple selections are allowed; if false only single item selections are allowed
 o ImageListBox
public ImageListBox(Component parent,
                    String slabel,
                    int rows,
                    boolean bMultipleSelections)
Note: ImageListBox() is deprecated. see constructor ImageListBox(String slabel, int rows, boolean bMultipleSelections)

 o ImageListBox
public ImageListBox(Component parent,
                    String label)
Note: ImageListBox() is deprecated. see constructor ImageListBox(String slabel, int rows, boolean bMultipleSelections)

Methods

 o addActionListener
public synchronized void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this component.

Parameters:
l - the action listener
 o addItem
public synchronized void addItem(String item) throws PropertyVetoException
Adds an item to the end of the list and enables the item.

Parameters:
item - the item to be added
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o addItem
public synchronized void addItem(String item,
                                 boolean bEnabled) throws PropertyVetoException
Adds an item to the end of the list and conditionally enables it.

Parameters:
item - the item to be added
bEnabled - if true, enable the item; if false, disable the item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o addItem
public synchronized void addItem(Image image,
                                 String item) throws PropertyVetoException
Adds an item with an image to the end of the list and enables it.

Parameters:
image - the image to display on the item line
item - the item to be added
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o addItem
public synchronized void addItem(Image image,
                                 String item,
                                 boolean bEnabled) throws PropertyVetoException
Adds an item with an image to the end of the list and conditionally enables it.

Parameters:
image - the image to display on item line
item - the item to be added
bEnabled - if true, enable the item; if false, disable the item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o addItem
public synchronized void addItem(Image image,
                                 String item,
                                 boolean bEnabled,
                                 Color color) throws PropertyVetoException
Adds an item with an image to the end of the list and conditionally enables it. The item text will be displayed in the given color.

Parameters:
image - the image to display on item line
item - the item to be added
bEnabled - if true, enable the item; if false, disable the item
color - the color of the item's text
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean)
 o addItem
protected void addItem(ListItem li) throws PropertyVetoException
Adds an ListItem to the end of the list.

Parameters:
li - the item to add
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o addItemListener
public synchronized void addItemListener(ItemListener l)
Adds the specified item listener to receive item events

Parameters:
l - the item listener
See Also:
removeItemListener, sourceItemEvent
 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners. It is also used to handle list metrics after the peer is created.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to add.
See Also:
removeVetoableChangeListener
 o allSelected
public boolean allSelected()
Note: allSelected() is deprecated.

See Also:
isAllSelected
 o allowsMultipleSelections
public boolean allowsMultipleSelections()
Note: allowsMultipleSelections() is deprecated.

See Also:
isMultipleSelections
 o blockPaint
public synchronized void blockPaint(boolean cond)
Blocks the repainting of the control.

Parameters:
cond - true to prevent updating the component, false for normal painting behavior
 o calculateBorderColors
protected void calculateBorderColors(Color c)
Used to calculate the border colors from the background color.

See Also:
addNotify, setBackground
 o changeImage
public void changeImage(int index,
                        Image image) throws PropertyVetoException
Note: changeImage() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setImage(int, java.awt.Image)
 o changeText
public void changeText(int index,
                       String text) throws PropertyVetoException
Note: changeText() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setText(int, java.lang.String)
 o clear
public synchronized void clear()
Clears the list.

See Also:
delItem, delItems
 o countItems
public int countItems()
Returns the total number of items in the list.

Returns:
the number of items in the list
See Also:
getItem
 o ctrlSelect
protected void ctrlSelect(int index)
Selects an index in a ImageListBox using the Ctrl modifier to mimic mouse selecting with the Ctrl modifier.

Parameters:
index - the zero-relative position of the item to select
 o delItem
public synchronized void delItem(int index) throws PropertyVetoException
Delete an item from the list.

Parameters:
index - the zero-relative index of the item to delete
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
delItems, delSelectedItems
 o delItems
public synchronized void delItems(int start,
                                  int end) throws PropertyVetoException
Delete multiple items from the list. Note that the end index must be greater than or equal to the start index.

Parameters:
start - the zero-relative start index of the items
end - the zero-relative end index of the items
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
delItem, delSelectedItems
 o delSelectedItems
public synchronized void delSelectedItems() throws PropertyVetoException
Deletes the currently selected items from the list.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
delItem, delItems
 o deselect
public synchronized void deselect(int index) throws PropertyVetoException
Note: deselect() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setSelectedIndex(int, boolean)
 o deselectAll
public synchronized void deselectAll() throws PropertyVetoException
Deselects all items in the list.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
selectAll
 o disable
public void disable(int index) throws PropertyVetoException
Note: disable() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setEnabled(int, boolean)
 o enable
public void enable(int index,
                   boolean cond) throws PropertyVetoException
Note: enable() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setEnabled(int, boolean)
 o enable
public void enable(int index) throws PropertyVetoException
Note: enable() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setEnabled(int, boolean)
 o extraPaint
public void extraPaint(Graphics g,
                       Rectangle rect)
Override this method to add any special painting effects after text and images are painted

Parameters:
g - the graphics
rect - the bounding rectangle
 o getBorderType
public int getBorderType()
Gets the current border type of the ImageListBox. A regular border makes the list box appear lower than the surrounding area.

Returns:
the current border type, BORDER_REGULAR or BORDER_NONE
See Also:
setBorderType, BORDER_REGULAR, BORDER_NONE
 o getBorderWidth
public int getBorderWidth()
Get the width of the border around the component. This value is the number of pixels needed to display the border completely on both sides of the component; it is not the width of one side of the border.

Returns:
the width in pixels
 o getCellBorders
public boolean getCellBorders()
Note: getCellBorders() is deprecated.

See Also:
isCellBorders
 o getCellHeight
public int getCellHeight()
Get the height of an individual row.

Returns:
the height in pixels
 o getColumns
public synchronized int getColumns()
Returns the number of columns to be used by minimumSize().

Returns:
the number of columns
See Also:
setColumns
 o getComboMode
public boolean getComboMode()
Note: getComboMode() is deprecated.

See Also:
isComboMode
 o getEdited
public boolean getEdited(int index)
Note: getEdited() is deprecated.

See Also:
isEdited
 o getEnabledTextColor
public java.awt.Color getEnabledTextColor(int index)
Gets the text color for an item at the given index.

Parameters:
index - the zero-relative index of the item
Returns:
the color, null if the default text color is used or the index is not valid.
 o getImage
public java.awt.Image getImage(int index)
Gets the image associated with the specified zero-relative index.

Parameters:
index - the zero-relative position of the item
Returns:
the image at the index, or null if the index is invalid
See Also:
setImage(int, java.awt.Image)
 o getImageURL
public java.net.URL getImageURL(int index)
Gets the URL of the image displayed at the given zero-based index.

Parameters:
index - the zero-relative index of the image to get
Returns:
the URL of the image
See Also:
setImage
 o getItem
public java.lang.String getItem(int index)
Note: getItem() is deprecated.

See Also:
getText
 o getLabel
public synchronized java.lang.String getLabel()
Returns the current list box label.

Returns:
the current list box label
See Also:
setLabel
 o getListItems
public java.lang.String[] getListItems()
Returns the current list as an array.

Returns:
String[] current list
See Also:
setListItems
 o getMinimumSize
public java.awt.Dimension getMinimumSize(int rows)
Returns the minimum dimensions needed to show the given number of rows in the list.

Parameters:
rows - the number of visible rows in the list
Returns:
the minimum size of this list to show the given number of rows
 o getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component. The size returned is big enough to show the maximum number of visible rows as requested when constructed, or all the rows currently in the list.

Overrides:
getMinimumSize in class Container
See Also:
preferredSize
 o getPreferredSize
public java.awt.Dimension getPreferredSize(int rows)
Returns the preferred dimensions needed for the list with the specified number of rows.

Parameters:
rows - the number of visible rows in the list
Returns:
the preferred size to show the specified number of rows
 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component. The size returned is big enough to show the maximum number of visible rows as requested when constructed, or all the rows currently in the list.

Overrides:
getPreferredSize in class Container
See Also:
minimumSize
 o getRows
public int getRows()
Returns the number of currently visible lines in this list.

Returns:
the number of visible lines in the list.
 o getRowsToShow
public int getRowsToShow()
Gets the current number of rows to display. This affects the dimensions returned by getPreferredSize and determines the number of rows displayed when this component is automatically laid out.

Returns:
the current number of rows to automatically display
See Also:
setRowsToShow
 o getSelectedIndex
public synchronized int getSelectedIndex()
Gets the zero-relative index of the selected item in the list. If multiple items are selected, the index of the item most recently selected is returned.

Returns:
the zero-relative index of the selected item, or -1 if no item is selected
See Also:
select, deselect, isSelected
 o getSelectedIndexes
public synchronized int[] getSelectedIndexes()
Returns the indexes of all the selected items in the list.

Returns:
an array of the zero-relative indexes of the selected items
See Also:
select, deselect, isSelected
 o getSelectedItem
public synchronized java.lang.String getSelectedItem()
Returns the currently selected item in the list. If multiple items are selected, the item most recently selected is returned.

Returns:
the currently selected item, or null if no item is selected.
See Also:
setSelectedItem, getSelectedItems, deselect, isSelected
 o getSelectedItems
public synchronized java.lang.String[] getSelectedItems()
Returns all of the the selected items in the list.

Returns:
an array of all the selected items in the list
See Also:
getSelectedItem, setSelectedItem, isSelected
 o getSelectedObjects
public java.lang.Object[] getSelectedObjects()
Returns the selected items in the list. Needed in order to implement the java.awt.ItemSelectable interface

Returns:
an array of selected items in the list, as an array of Objects.
See Also:
getSelectedItem, setSelectedItem, isSelected, ItemSelectable
 o getShowHorizontalScroll
public boolean getShowHorizontalScroll()
Note: getShowHorizontalScroll() is deprecated.

See Also:
isShowHorizontalScroll
 o getShowVerticalScroll
public boolean getShowVerticalScroll()
Note: getShowVerticalScroll() is deprecated.

See Also:
isShowVerticalScroll
 o getText
public java.lang.String getText(int index)
Gets the item text associated with the specified zero-relative index.

Parameters:
index - the zero-relative position of the item
Returns:
the item text, or null if the index is invalid
See Also:
setText
 o getTopRow
public synchronized int getTopRow()
Returns the index of the item visible at the top of the window.

Returns:
index the zero-relative position of the item
See Also:
setTopRow
 o getVisibleIndex
public int getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.

Returns:
the zero-relative index of the item last made visible by the makeVisible method
See Also:
makeVisible
 o insertItem
public synchronized void insertItem(int index,
                                    Image image,
                                    String item,
                                    boolean bEnabled)
Inserts an item with an image at a specific zero-relative index and conditionally enables it.

Parameters:
index - the zero-relative index to insert at
image - the image to display on the item line
item - the item to be added
bEnabled - if true, enable the item; if false, disable the item
 o insertItems
public synchronized void insertItems(int index,
                                     Vector itemVector,
                                     Image image,
                                     boolean bEnabled) throws PropertyVetoException
Inserts a vector list of items at a specific zero-relative index and conditionally enables them. Each item will be displayed with the given image.

Parameters:
index - the zero-relative index to insert at
itemVector - the item vector to be added
image - the image to display for all inserted items
bEnabled - if true, enable the items; if false, disable the items
Throws: PropertyVetoException
if the specified property value is unacceptable
 o isAllSelected
public boolean isAllSelected()
Query if all rows are selected.

Returns:
returns true if all rows in the ImageListBox are selected
 o isCellBorders
public boolean isCellBorders()
Gets the current default cell border display mode. Cell borders are always shown as a solid single-pixel wide line around the cell.

Returns:
true if the "grid lines on by default" mode is on, otherwise false
See Also:
setCellBorders
 o isComboMode
public boolean isComboMode()
Gets the current "ComboBox mode" setting. "ComboBox mode" allows the selection point to follow the mouse even when the mouse button is not down. This only applies when the ImageListBox is not allowing multiple selections.

Returns:
true if in "ComboBox mode", otherwise false
See Also:
setComboMode
 o isDirty
public synchronized boolean isDirty()
Query the lists all "dirty" state

Returns:
true if on the next repaint the entire list will be repainted, or false if the list will not be repainted.
See Also:
setDirty(boolean)
 o isEdited
public boolean isEdited(int index)
Gets the "edited" flag state for the item at the given zero-relative index.

Parameters:
index - the zero-relative position of the item
Returns:
true if flagged as edited, false if not
See Also:
setEdited
 o isEnabled
public boolean isEnabled(int index)
Gets the enabled state of a specific item in the list.

Parameters:
index - the zero-relative position of the item in the list
Returns:
true if the item is enabled, false if the item is disabled.
See Also:
setEnabled(int, boolean)
 o isFocusTraversable
public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class Component
 o isMultipleSelections
public boolean isMultipleSelections()
Returns true if this list allows multiple selections.

Returns:
true if multiple selections allowed, false otherwise
See Also:
setMultipleSelections
 o isSelected
public synchronized boolean isSelected(int index)
Get the selected state of the item at the given index.

Parameters:
index - the zero-relative index of the item to be checked
Returns:
true if the item at the specified index is selected; false if it is not selected
See Also:
select, deselect, isSelected
 o isShowHorizontalScroll
public boolean isShowHorizontalScroll()
Gets the current horizontal scrollbar visibility flag.

Returns:
true if the horizontal scrollbar will be made visible when necessary; false if the horizontal scrollbar will never be made visible
See Also:
setShowHorizontalScroll
 o isShowVerticalScroll
public boolean isShowVerticalScroll()
Gets the current vertical scrollbar visibility flag.

Returns:
true if the vertical scrollbar will be made visible when necessary; false if the vertical scrollbar will never be made visible
See Also:
setShowVerticalScroll
 o isVisibleIndex
protected boolean isVisibleIndex(int index)
Determines if the item at the given index is visible.

Parameters:
index - the zero-relative index of the item to check
Returns:
true if the item is visible, false if not
 o keyCalcIndex
protected int keyCalcIndex(int offset,
                           boolean bAbsolute)
Determines the current index given a new absolute or relative index.

Parameters:
offset - the value used to compute the new index
boolean - true if offset is zero-relative, false if offset is relative to the current index value
Returns:
the new current index value
 o makeVisible
public synchronized void makeVisible(int index) throws PropertyVetoException
Note: makeVisible() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setVisibleIndex
 o minimumSize
public java.awt.Dimension minimumSize(int rows)
Note: minimumSize() is deprecated.

See Also:
getMinimumSize(int)
 o minimumSize
public java.awt.Dimension minimumSize()
Note: minimumSize() is deprecated.

Overrides:
minimumSize in class Container
See Also:
getMinimumSize
 o mouseCalcIndex
protected int mouseCalcIndex(int y)
A utility routine that determines the index of the item the mouse is in, given the vertical coordinate of the mouse.

Parameters:
y - mouse vertical (y) coordinate
Returns:
the zero-relative index of the item the mouse is in, or -1 if past the end of the list
 o notifyHelper
protected void notifyHelper(int x,
                            int y,
                            int index,
                            boolean bDoubleClick)
Utility routine to generate action and/or item events in response to key or mouse events.

Parameters:
x - mouse component-relative horizontal position, in pixels
x - mouse component-relative vertical position, in pixels
index - zero-relative index of currently selected item
bDoubleClick - true if mouse double-clicked on item
 o paint
public synchronized void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Container
See Also:
repaint, update
 o paramString
protected java.lang.String paramString()
Returns a string representing the state of this object. This is a standard Java AWT method which can be usefull for debugging.

Returns:
a handy string for debugging purposes
Overrides:
paramString in class Container
 o preferredSize
public java.awt.Dimension preferredSize(int rows)
Note: preferredSize() is deprecated.

See Also:
getPreferredSize(int)
 o preferredSize
public java.awt.Dimension preferredSize()
Note: preferredSize() is deprecated.

Overrides:
preferredSize in class Container
See Also:
getPreferredSize
 o removeActionListener
public synchronized void removeActionListener(ActionListener l)
Removes the specified action listener so it no longer receives action events from this component.

Parameters:
l - the action listener
 o removeItemListener
public synchronized void removeItemListener(ItemListener l)
Removes the specified item listener so it no longer receives item events.

Parameters:
l - the action listener
See Also:
addItemListener, sourceItemEvent
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class Container
See Also:
addNotify
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to remove.
See Also:
addVetoableChangeListener
 o reshape
public synchronized void reshape(int x,
                                 int y,
                                 int width,
                                 int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
 o scrollHorizontal
public synchronized void scrollHorizontal(int info,
                                          boolean bAbsolute)
Scrolls the ImageListBox horizontally

Parameters:
info - either an absolute value or Event.SCROLL_PAGE_DOWN, Event.SCROLL_PAGE_UP, Event.SCROLL_LINE_DOWN, Event.SCROLL_LINE_UP. The range for absolute value should be between 0 and the width of the largest item, in pixels
bAbsolute - true to treat the info parameter as an absolute value, false to treat it as one of the SCROLL_... constants
 o scrollVertical
public synchronized void scrollVertical(int info,
                                        boolean bAbsolute)
Scrolls the ImageListBox vertically.

Parameters:
info - either an absolute value or Event.SCROLL_PAGE_DOWN, Event.SCROLL_PAGE_UP, Event.SCROLL_LINE_DOWN, Event.SCROLL_LINE_UP. The range for an absolute value should be between 0 and (number of rows-1).
bAbsolute - true to treat the info parameter as an absolute value, false to treat it as one of the SCROLL_... constants
 o select
public synchronized void select(int index) throws PropertyVetoException
Note: select() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setSelectedIndex(int, boolean)
 o select
public synchronized void select(String str) throws PropertyVetoException
Note: select() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setSelectedItem(java.lang.String, boolean)
 o selectAll
public synchronized void selectAll()
Selects all the items in the list.

See Also:
select, deselectAll
 o selectMultiple
public synchronized void selectMultiple(int index,
                                        boolean bShift,
                                        boolean bControl) throws PropertyVetoException
Selects an item at the specified index in a multiple-selection-enabled ImageListBox using Shift, Ctrl or Ctrl-Shift modifiers to mimic mouse selecting with the Shift, Ctrl or Ctrl-Shift modifiers.

Parameters:
index - the zero-relative position of the item to select
bShift - whether to select with the Shift modifier
bControl - whether to select with the Ctrl modifier
Throws: PropertyVetoException
if the specified property value is unacceptable
 o setBorderType
public void setBorderType(int type) throws PropertyVetoException
Sets the border type of the ImageListBox. A regular border makes the list box appear lower than the surrounding area.

Parameters:
type - new border type, BORDER_REGULAR or BORDER_NONE
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getBorderType, BORDER_REGULAR, BORDER_NONE
 o setCellBorder
public void setCellBorder(int index,
                          boolean bOn) throws PropertyVetoException
Conditionally show a border around the cell at the specified index. Cell borders are always shown as a solid single-pixel wide line around the cell.

Parameters:
index - the zero-relative index of the cell
bOn - true to show the cell borders; false to not show them
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setCellBorders
 o setCellBorders
public void setCellBorders(boolean bOn) throws PropertyVetoException
Sets the ImageListBox cell border display default, and resets all items to have the border conditionally. Cell borders are always shown as a solid single-pixel wide line around the cell.

Parameters:
bOn - true for "grid lines on by default" mode, false for "grid lines off by default" mode.
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setCellBorder, isCellBorders
 o setColumns
public synchronized void setColumns(int columns) throws PropertyVetoException
Sets the number of columns to be used by getMinimumSize().

Parameters:
columns - the number of columns
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getColumns
 o setComboMode
public void setComboMode(boolean cond) throws PropertyVetoException
Sets ImageListBox "ComboBox mode". "ComboBox mode" allows the selection point to follow the mouse even when the mouse button is not down. This only applies when the ImageListBox is not allowing multiple selections.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isComboMode
 o setDirty
public synchronized void setDirty(boolean isDirty) throws PropertyVetoException
Set the list to be "dirty" (true) to force a complete paint on next repaint, or "clean" (false) to avoid a complete paint on the next repaint.

Parameters:
isDirty - true if the list is dirty (needs repaint)
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isDirty
 o setDirty
public synchronized void setDirty() throws PropertyVetoException
Note: setDirty() is deprecated.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setDirty(boolean)
 o setEdited
public void setEdited(int index,
                      boolean bCond) throws PropertyVetoException
Set a flag indicating that the item at the given zero-relative index has been edited.

Parameters:
index - the zero-relative position of the item
bCond - the "edited" flag
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isEdited
 o setEnabled
public void setEnabled(int index,
                       boolean cond) throws PropertyVetoException
Conditionally enables the specified item in the list.

Parameters:
index - the zero-relative position of the item
cond - if true, enable the item; if false, disable the item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isEnabled
 o setEnabledTextColor
public void setEnabledTextColor(int index,
                                Color color) throws PropertyVetoException
Sets the text color for an item at the given index.

Parameters:
index - the zero-relative index of the item
color - the color, null to use the default text color
Throws: PropertyVetoException
if the specified property value is unacceptable
 o setFont
public synchronized void setFont(Font f)
Set the font for the items in the list box.

Parameters:
f - new font to use for list box items
Overrides:
setFont in class Component
 o setImage
public void setImage(int index,
                     Image image) throws PropertyVetoException
Change the image associated with an item at a specific zero-relative index.

Parameters:
index - the zero-relative position of the item
image - the image to associate with an item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getImage(int)
 o setImageURL
public void setImageURL(int index,
                        URL aUrl) throws MalformedURLException, PropertyVetoException
Sets the URL of the image to display at the given zero based index

Parameters:
aURL - the image URL
Throws: MalformedURLException
if the URL parameter is bad
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getImage
 o setLabel
public synchronized void setLabel(String label) throws PropertyVetoException
Sets the current list box label.

Parameters:
label - the new list box label
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getLabel
 o setListItems
public void setListItems(String[] items) throws PropertyVetoException
Initializes the list with the string array. Any pre-existing items are lost.

Parameters:
items - the new list items
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getListItems, setListItems(java.lang.String[]), addItem(java.lang.String), addItem(java.lang.String, boolean), addItem(java.awt.Image, java.lang.String), addItem(java.awt.Image, java.lang.String, boolean), addItem(java.awt.Image, java.lang.String, boolean, java.awt.Color)
 o setMultiColumnMode
public synchronized void setMultiColumnMode(boolean bCellBorders) throws PropertyVetoException
Sets the mode of the ImageListBox to "MultiColumnListBox mode". This method always sets the border type to BORDER_NONE, the "ComboBox mode" to be false, and conditionally sets whether the grid should be displayed.

Parameters:
bCellBorders - true to display the cell grid, false to not display the grid
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
BORDER_NONE
 o setMultipleSelections
public void setMultipleSelections(boolean cond) throws PropertyVetoException
Sets whether this list should allow multiple selections or not.

Parameters:
cond - whether to allow multiple selections
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
allowsMultipleSelections
 o setRowsToShow
public void setRowsToShow(int rows) throws PropertyVetoException
Sets the number of rows to display in the ImageListBox. This affects the dimensions returned by getPreferredSize and determines the number of rows displayed when this component is automatically laid out.

Parameters:
rows - number of rows to automatically display
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getRowsToShow
 o setSelectedIndex
public synchronized void setSelectedIndex(int index,
                                          boolean isSelected) throws PropertyVetoException
Select the item at the specified index. This method deselects all others when multiple selections not enabled.

Parameters:
index - the zero-relative position of the item to select
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getSelectedItem, deselect, isSelected
 o setSelectedItem
public synchronized void setSelectedItem(String str,
                                         boolean isSelected) throws PropertyVetoException
Sets the slelection state of the first item in the list which has exactly matching text.

Parameters:
str - the String to select in the list
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getSelectedItem
 o setShowHorizontalScroll
public void setShowHorizontalScroll(boolean cond) throws PropertyVetoException
Sets the horizontal scrollbar visibility flag.

Parameters:
cond - if true, the horizontal scrollbar will be made visible when necessary; if false, the horizontal scrollbar will never be made visible
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isShowHorizontalScroll
 o setShowVerticalScroll
public void setShowVerticalScroll(boolean cond) throws PropertyVetoException
Sets the vertical scrollbar visibility flag.

Parameters:
cond - if true, the vertical scrollbar will be made visible when necessary; if false, the vertical scrollbar will never be made visible
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isShowVerticalScroll
 o setText
public void setText(int index,
                    String text) throws PropertyVetoException
Changes the text associated with the item at the specified zero-relative index.

Parameters:
index - the zero-relative position of the item
text - the new text to associate with the item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getText
 o setTopRow
public void setTopRow(int index) throws PropertyVetoException
Forces the item at the specified index to be visible at the top of the window.

Parameters:
index - the zero-relative position of the item
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getTopRow
 o setVisibleIndex
public synchronized void setVisibleIndex(int index) throws PropertyVetoException
Forces the item at the specified index to be visible in the window.

Parameters:
index - the zero-relative position of the item to be made visible
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getVisibleIndex
 o shiftSelect
protected void shiftSelect(int index,
                           boolean bControl) throws PropertyVetoException
Selects an index in a multiple-selection-enabled ImageListBox using Shift or Ctrl-Shift modifiers to mimic mouse selecting with the Shift or Ctrl-Shift modifiers.

Parameters:
index - the zero-relative position of the item to select
bControl - whether to select with the Ctrl modifier
Throws: PropertyVetoException
if the specified property value is unacceptable
 o show
public synchronized void show()
Makes this component visible. This is a standard Java AWT method which gets called to show this component. If this component was invisible due to a previous hide() call it make this component visible again.

Overrides:
show in class Component
See Also:
hide
 o sourceActionEvent
protected void sourceActionEvent(String command)
Fire an action event to the listeners

Parameters:
command - the string containing the command to send with the event.
 o sourceItemEvent
protected void sourceItemEvent()
Fire an item event to the listeners

See Also:
addItemListener, removeItemListener
 o update
public synchronized void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component. It is overridden here to prevent the flicker associated with the standard update() method's repainting of the background before painting the component itself, and to allow the blocking of painting entirely.

Parameters:
g - the graphics context
Overrides:
update in class Container
See Also:
repaint, paint
 o validIndex
protected boolean validIndex(int index)
Determines if the given index is valid.

Parameters:
index - a zero-relative index to check
Returns:
true if the index is valid, false if not

All Packages  Class Hierarchy  This Package  Previous  Next  Index